/*
 * UWT 2014
 */
package tools;

import model.HeatMapData;

/**
 * HeatMapPreview creates HeatMapData objects for the sample and gradient heat maps
 * used in the preview section of the GUI.
 * 
 * @author Jamada
 */
public class HeatMapPreview {
	
	//Sample heat map attributes.
	private static final String SAMPLE_TITLE = "                Heat Map Sample";
    private static final double[][] SAMPLE_DATA = new double[][]{{3,2,3,4,5,6},
                                                          {2,3,4,5,6,7},
                                                          {3,4,5,6,7,6},
                                                          {4,5,6,7,6,5}};    
    private final static Object[] SAMPLE_Y_VALUES = new Object[]{"P15121", "Q13427", "P00918", "P22749"};
    private final static Object[] SAMPLE_X_VALUES = new Object[]{"mitoxantrone", "clofarabine", "daunorubicin", "etoposide", "fludarabine", "norfloxacin"};
    
    //Gradient heat map attributes.
    private static final String GRADIENT_TITLE = "     Heat Map Gradient";
    private static final double[][] HEAT_MAP_KEY = new double[][]{{0, 0.4, 0.8, 1.2, 1.6, 2.0}};  
    private final static Object[] GRADIENT_X_VALUES = new Object[]{"0", "0.4", "0.8", "1.2", "1.6", "2.0"};       
    private final static Object[] GRADIENT_Y_VALUES = new Object[]{""};

    public static HeatMapData getGradientHeatMapData() {

    	final HeatMapData mapData = new HeatMapData(HEAT_MAP_KEY, GRADIENT_X_VALUES, GRADIENT_Y_VALUES);
        mapData.setTitle(GRADIENT_TITLE);
        mapData.setXValuesHorizontal(true);
        mapData.setXAxisLabel("");
        mapData.setYAxisLabel("");
        
        return mapData;
    }
    
    public static HeatMapData getSampleHeatMapData() {
        
    	final HeatMapData mapData = new HeatMapData(SAMPLE_DATA, SAMPLE_X_VALUES, SAMPLE_Y_VALUES);
    	mapData.setTitle(SAMPLE_TITLE);

    	return mapData;
    }

}
